﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace blackhouse.BlackApart.Business.Furnitures {
    public class ImpFurniture : IFurniture {

        #region Properties

        public int Id { get; set; }
        public string Name { get; set; }
        public string Description { get; set; }
        public string ImageName { get; set; }
        public byte[] ImageData { get; set; }
        public int Sort { get; set; }

        #endregion

        #region Methods

        public bool SaveFurniture() {
            return
                !string.IsNullOrEmpty(this.Name)
                && !string.IsNullOrEmpty(this.ImageName)
                && this.ImageData != null;
        }

        public void SetImageData(byte[] data) {
            this.ImageData = data;
        }

        public bool AddToApartment(int apartmentId) {
            return apartmentId > 0 && this.Id > 0;
        }

        public IFurniture[] GetApartmentFurnitures(int apartmentId) {
            throw new NotImplementedException();
        }

        public IFurniture[] GetApartmentTypeFurnitures(int apartmentTypeId) {
            throw new NotImplementedException();
        }

        public string GetFurnitureIconImageUrl(System.Drawing.Size size) {
            throw new NotImplementedException();
        }

        #endregion

    }
}
